﻿using UnityEngine;
using System.Collections;

public class LogicSideBoardManager : MonoBehaviour {

    public ActionProcessor actionProcessor;

    GridSpace gridSquare;

    public GridSpace[,] myBoard;
	// Use this for initialization
	void Start () {

        print(string.Format("Initializing LogicSideBoardManager with grid size {0}, {1}", actionProcessor.boardWidth, actionProcessor.boardHeight));
        myBoard = new GridSpace[actionProcessor.boardWidth, actionProcessor.boardHeight];

        for (int i = 0; i < actionProcessor.boardWidth; i++)
        {

            for (int j = 0; j < actionProcessor.boardHeight; j++)
            {
                myBoard[i, j] = new GridSpace();
                myBoard[i, j].content = 0;
            }

        }
	}
	
	// Update is called once per frame
	void Update () {
	
	}

    public bool CheckSpaceContains(int x, int y, int name)
    {
        if (myBoard[x, y].content == name)
        {
            return true;
        }

        else
        {
            return false;
        }
    }

    public void ChangeSpaceContent(int x, int y, int name)
    {
        myBoard[x, y].content = name;
    }

    public void checkRules(int x, int y, int name)
    {

    }
}
